<?php
/**
*	系统里默认的option模块的
*/
namespace Rainrock\Framework\Module;


use Rainrock\Framework\kernel\core\ModuleInfo;
use Rainrock\Framework\kernel\core\ModuleFields;
use Rainrock\Framework\kernel\base\Rock;

class OptionModuleInfo extends ModuleInfo{
	
	protected function initModule(){
		 $this->setName('数据选项');
		 $this->setNum('option');
		 
		 $this->addIndex('key', 'num');
		 
		 $this->addFields(ModuleFields::get('name')
			->setName('名称')
			->setLen(100)
			->setType('varchar')
		 );
		 
		 $this->addFields(ModuleFields::get('pid')
			->setName('上级ID')
			->setDev(null)
			->setType('int')
		 );
		 
		 $this->addFields(ModuleFields::get('num')
			->setName('编号')
			->setLen(50)
			->setType('varchar')
		 );
		 
		 $this->addFields(ModuleFields::get('value')
			->setName('对应值')
			->setLen(1000)
			->setType('varchar')
		 );


		 $this->addFields(ModuleFields::get('valid')
			->setName('是否可用')
			->setLen(1)
			->setDev(1)
			->setType('tinyint')
		 );
		 

		 $this->addFields(ModuleFields::get('explain')
			->setName('说明')
			->setLen(200)
			->setType('varchar')
		 );
		 
		 $this->addFields(ModuleFields::get('sort')
			->setName('排序号')
			->setDev(0)
			->setType('int')
		 );
		 
		 $this->addFields(ModuleFields::get('optdt')
			->setName('操作时间')
			->setType('datetime')
		 );
		 
		 $this->addFields(ModuleFields::get('optid')
			->setName('操作人ID')
			->setDev(0)
			->setType('int')
		 );
		 
	}
}